
#import libs = nanorange%lib{nanorange}

# Skip broken tests and things we haven't implemented yet
exe{test-nanorange}: cxx{**\
    -test_type_traits           \
    -iterator/incomplete        \
    -iterator/iterator          \
    -views/indirect_view         \
    -views/move_view             \
    -views/repeat_n_view         \
    -views/repeat_view           \
    -views/span                  \
    -views/take_exactly_view     \
}
exe{test-nanorange}: hxx{**}
exe{test-nanorange}: test = true

cxx.coptions += "-DNANORANGE_NO_DEPRECATION_WARNINGS"
cxx.poptions += "-I$src_root/include/"

# Compiler-specific warnings
if ($cxx.class == 'msvc')
{
    cxx.coptions += "/permissive-"
    cxx.coptions += "/constexpr:steps1000000" "/wd4267" "/wd4244"
}

if ($cxx.id.type == 'gcc')
{
    cxx.coptions += "-Wall" "-Wextra" "-pedantic" "-Wno-attributes"
}

if ($cxx.id.type == 'clang')
{
    cxx.coptions += "-Wall" "-Wextra" "-pedantic"\
        "-Wno-unneeded-internal-declaration" "-Wno-missing-braces" "-Wno-unused-function"\
        "-Wno-mismatched-tags" "-Wno-undefined-internal" "-Wno-void-ptr-dereference"
}
